package dm1101.demo01;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/1 14:34
 */
public class TestSleep {
    public static void main(String[] args) {
        Sleep sleep = new Sleep();
        sleep.start();
    }
}
class Sleep extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(Thread.currentThread().getName()+"===="+i);
        }
    }
}
